package com.kun.remote.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @author kun.li
 */
@Slf4j
public class RemoteUserServiceFallBackFactory implements FallbackFactory<RemoteUserServiceFallBack> {
    @Override
    public RemoteUserServiceFallBack create(Throwable cause) {
        log.error(cause.getMessage());
        return new RemoteUserServiceFallBack();
    }
}
